﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dycox
{
    internal static class SR
    {
        public static string GetString(string id, params object[] args)
        {
            if (id == null)
                throw new ArgumentNullException("id");

            string text = Properties.Resources.ResourceManager.GetString(id);

            if (text == null) return id;

            if (args != null && args.Length > 0)
            {
                try
                {
                    text = string.Format(text, args);
                }
                catch
                {
                }
            }

            return text;
        }
    }
}
